let content = document.querySelector("#content")
$.ajax({
    url: "http://chst.vip:1234/api/getinlanddiscount",
    responseType: "json",
})
    .then((res) => {
        let divs = ""
        console.log(res);
        res.result.forEach(item => {
            divs += ` <a href="inlandproduct.html?productid=${item.productId}&title=国内折扣">
           ${item.productImg}
            <div>${item.productName}</div>
            <div>${item.productPrice}</div>
            <div>
                <p>${item.productFrom}</p>
                <p>${item.productTime}</p>
            </div>
        </a>`
        });
        content.innerHTML = divs
    })

$("#backtop").click(function () {
    console.log(123);
    $("html").animate({ scrollTop: 0 }, 1000)
})